home *** CD-ROM | disk | FTP | other *** search
-
-
-
- MAKE(1L) LOCAL USER COMMANDS MAKE(1L)
-
-
-
- NAME
- make - GNU make utility to maintain groups of programs
-
- SYNOPSIS
- make [ -f makefile ] [ option ] ... target ...
-
- WARNING
- This man paage is an extract of the documentation of _G_N_U
- _m_a_k_e . It is updated only occasionally, because the GNU pro-
- ject does not use nroff. For complete, current documenta-
- tion, refer to the Info file make or the DVI file make.dvi
- which are made from the Texinfo source file make.texinfo.
-
- DESCRIPTION
- The purpose of the _m_a_k_e utility is to determine automati-
- cally which pieces of a large program need to be recompiled,
- and issue the commands to recompile them. This manual
- describes the GNU implementation of _m_a_k_e, which was written
- by Richard Stallman and Roland McGrath. Our examples show C
- programs, since they are most common, but you can use _m_a_k_e
- with any programming language whose compiler can be run with
- a shell command. In fact, _m_a_k_e is not limited to programs.
- You can use it to describe any task where some files must be
- updated automatically from others whenever the others
- change.
-
- To prepare to use _m_a_k_e, you must write a file called the
- _m_a_k_e_f_i_l_e that describes the relationships among files in
- your program, and the states the commands for updating each
- file. In a program, typically the executable file is
- updated from object files, which are in turn made by compil-
- ing source files.
-
- Once a suitable makefile exists, each time you change some
- source files, this simple shell command:
-
- make
-
- suffices to perform all necessary recompilations. The _m_a_k_e
- program uses the makefile data base and the last-
- modification times of the files to decide which of the files
- need to be updated. For each of those files, it issues the
- commands recorded in the data base.
-
- _m_a_k_e executes commands in the _m_a_k_e_f_i_l_e to update one or more
- target _n_a_m_e_s, where _n_a_m_e is typically a program. If no -f
- option is present, _m_a_k_e will look for the makefiles _G_N_U_-
- _m_a_k_e_f_i_l_e, _m_a_k_e_f_i_l_e, and _M_a_k_e_f_i_l_e, in that order.
-
- Normally you should call your makefile either _m_a_k_e_f_i_l_e or
- _M_a_k_e_f_i_l_e. (We recommend _M_a_k_e_f_i_l_e because it appears prom-
- inently near the beginning of a directory listing, right
-
-
-
- GNU Last change: 22 August 1989 1
-
-
-
-
-
-
- MAKE(1L) LOCAL USER COMMANDS MAKE(1L)
-
-
-
- near other important files such as _R_E_A_D_M_E.) The first name
- checked, _G_N_U_m_a_k_e_f_i_l_e, is not recommended for most makefiles.
- You should use this name if you have a makefile that is
- specific to GNU _m_a_k_e, and will not be understood by other
- versions of _m_a_k_e. If _m_a_k_e_f_i_l_e is `-', the standard input is
- read.
-
- _m_a_k_e updates a target if it depends on prerequisite files
- that have been modified since the target was last modified,
- or if the target does not exist.
-
- OPTIONS
- -b
-
- -m These options are ignored for compatibility with other
- versions of _m_a_k_e.
-
- -C _d_i_r
- Change to directory _d_i_r before reading the makefiles or
- doing anything else. If multiple -C options are speci-
- fied, each is interpreted relative to the previous one:
- -C / -C etc is equivalent to -C /etc. This is typi-
- cally used with recursive invocations of _m_a_k_e.
-
- -d Print debugging information in addition to normal pro-
- cessing. The debugging information says which files
- are being considered for remaking, which file-times are
- being compared and with what results, which files actu-
- ally need to be remade, which implicit rules are con-
- sidered and which are applied---everything interesting
- about how _m_a_k_e decides what to do.
-
- -e Give variables taken from the environment precedence
- over variables from makefiles.
-
- -f _f_i_l_e
- Use _f_i_l_e as a makefile.
-
- -i Ignore all errors in commands executed to remake files.
-
- -I _d_i_r
- Specifies a directory _d_i_r to search for included
- makefiles. If several -I options are used to specify
- several directories, the directories are searched in
- the order specified. Unlike the arguments to other
- flags of _m_a_k_e, directories given with -I flags may come
- directly after the flag: -I_d_i_r is allowed, as well as
- -I _d_i_r. This syntax is allowed for compatibility with
- the C preprocessor's -I flag.
-
- -j _j_o_b_s
- Specifies the number of jobs (commands) to run
-
-
-
- GNU Last change: 22 August 1989 2
-
-
-
-
-
-
- MAKE(1L) LOCAL USER COMMANDS MAKE(1L)
-
-
-
- simultaneously. If there is more than one -j option,
- the last one is effective. If the -j option is given
- without an argument, _m_a_k_e will not limit the number of
- jobs that can run simultaneously.
-
- -k Continue as much as possible after an error. While the
- target that failed, and those that depend on it, cannot
- be remade, the other dependencies of these targets can
- be processed all the same.
-
- -l
-
- -l _l_o_a_d
- Specifies that no new jobs (commands) should be started
- if there are others jobs running and the load average
- is at least _l_o_a_d (a floating-point number). With no
- argument, removes a previous load limit.
-
- -n Print the commands that would be executed, but do not
- execute them.
-
- -o _f_i_l_e
- Do not remake the file _f_i_l_e even if it is older than
- its dependencies, and do not remake anything on account
- of changes in _f_i_l_e. Essentially the file is treated as
- very old and its rules are ignored.
-
- -p Print the data base (rules and variable values) that
- results from reading the makefiles; then execute as
- usual or as otherwise specified. This also prints the
- version information given by the -v switch (see below).
- To print the data base without trying to remake any
- files, use make -p -f/_d_e_v/_n_u_l_l.
-
- -q ``Question mode''. Do not run any commands, or print
- anything; just return an exit status that is zero if
- the specified targets are already up to date, nonzero
- otherwise.
-
- -r Eliminate use of the built-in implicit rules. Also
- clear out the default list of suffixes for suffix
- rules.
-
- -s Silent operation; do not print the commands as they are
- executed.
-
- -S Cancel the effect of the -k option. This is never
- necessary except in a recursive _m_a_k_e where -k might be
- inherited from the top-level _m_a_k_e via MAKEFLAGS or if
- you set -k in MAKEFLAGS in your environment.
-
- -t Touch files (mark them up to date without really
-
-
-
- GNU Last change: 22 August 1989 3
-
-
-
-
-
-
- MAKE(1L) LOCAL USER COMMANDS MAKE(1L)
-
-
-
- changing them) instead of running their commands. This
- is used to pretend that the commands were done, in
- order to fool future invocations of _m_a_k_e.
-
- -v Print the version of the _m_a_k_e program plus a copyright,
- a list of authors and a notice that there is no war-
- ranty. After this information is printed, processing
- continues normally. To get this information without
- doing anything else, use make -v -f/_d_e_v/_n_u_l_l.
-
- -w Print a message containing the working directory before
- and after other processing. This may be useful for
- tracking down errors from complicated nests of recur-
- sive _m_a_k_e commands.
-
- -W _f_i_l_e
- Pretend that the target _f_i_l_e has just been modified.
- When used with the -n flag, this shows you what would
- happen if you were to modify that file. Without -n, it
- is almost the same as running a _t_o_u_c_h command on the
- given file before running _m_a_k_e, except that the modifi-
- cation time is changed only in the imagination of _m_a_k_e.
-
- SEE ALSO
- /usr/local/doc/gnumake.dvi
- _T_h_e _G_N_U _M_a_k_e _M_a_n_u_a_l
-
- BUGS
- See the chapter `Problems and Bugs' in _T_h_e _G_N_U _M_a_k_e _M_a_n_u_a_l .
-
- AUTHOR
- This manual page contributed by Dennis Morse of Stanford
- University. It has been reworked by Roland McGrath.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- GNU Last change: 22 August 1989 4
-
-
-
-